package org.ysu.mapper;

import org.apache.ibatis.annotations.Param;
import org.ysu.entity.Interview;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 走访记录表 Mapper 接口
 * </p>
 *
 * @author LiuJunDa
 * @since 2024-08-16
 */
public interface InterviewMapper extends BaseMapper<Interview> {
    BigDecimal avgIncomeByRegionId(Long rId);
    List<Map<String, Object>> countInterviewsByDateRangeAndRId(@Param("startDate") LocalDate startDate,
                                                               @Param("endDate") LocalDate endDate,
                                                               @Param("rId") Long rId);
    List<Map<String, Object>> getAdminInterviewSummary(@Param("rId") Long rId,
                                                       @Param("startDate") LocalDate startDate,
                                                       @Param("endDate") LocalDate endDate);
}
